package org.swust.sysmonitorapp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import lombok.Data;

/**
 * 健康数据表
 *
 * @since 2024-03-21
 */
@Data
@TableName("health_data")
public class HealthData implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 心率(次/分)
     */
    @TableField("heart_rate")
    private Integer heartRate;

    /**
     * 血氧饱和度(%)
     */
    @TableField("blood_oxygen")
    private BigDecimal bloodOxygen;

    /**
     * 体温(°C)
     */
    @TableField("temperature")
    private BigDecimal temperature;

    /**
     * 测量时间
     */
    @TableField("measure_time")
    private LocalDateTime measureTime;

    /**
     * 设备ID
     */
    @TableField("device_id")
    private String deviceId;

    /**
     * 数据来源
     */
    @TableField("data_source")
    private String dataSource;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 创建时间
     */
    @TableField("created_at")
    private LocalDateTime createdAt;
} 